﻿@{
    ViewBag.Title = "ListRss";
}



<h3>Rss information</h3>

<table>
    @if (ViewBag.RssFeed != null)
    {
        foreach (var item in ViewBag.RssFeed)
        {
        <tr>
            <td>
                <b>@item.title</b><a href="@item.link" target="_blank"> more </a>on @Convert.ToDateTime(item.date)
                <br />
                @Html.Raw(item.description)
            </td>
            <td>
                @if (item.read == true)
                {
                    <b>Element déja lu</b>
                }
                else
                {
                    <a href="./ListRss?id=@ViewBag.id&id_item=@item.id">Marquer comme lu</a>
                }
            </td>
        </tr>
        }
    }

</table>
@if (ViewBag.RssFeed == null)
{
    <p>Aucune information a afficher</p>
}